package net.mingsoft.report_data.biz.impl.report_gen;

import com.alibaba.fastjson.JSON;
import net.mingsoft.basic.util.DateUtil;
import net.mingsoft.report_data.biz.ZkDataCityLiveBiz;
import net.mingsoft.report_data.biz.ZkDataSgSqBiz;
import net.mingsoft.report_data.biz.impl.r.OdFeatureWorkHomeResponse;
import net.mingsoft.report_data.dao.ZkDataDao;
import net.mingsoft.report_data.entity.S02ProHgjj001Entity;
import net.mingsoft.report_data.entity.ZkDataPermanentPopulationEntity;
import net.mingsoft.report_data.entity.vo.DateWithCountDto;
import net.mingsoft.report_data.entity.vo.WeiboSignedUserDto;
import net.mingsoft.report_data.util.MathUtil;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.slf4j.helpers.MessageFormatter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;

/**
 * @author gengfa
 * @date 22/05/19
 */
@Service
public class ZkDataCityLiveBizImpl implements ZkDataCityLiveBiz {
    @Resource
    ZkDataDao dataDao;

    @Resource
    ZkDataSgSqBiz sgSqBiz;

    @Override
    public Map<String, Object> getAreaRank(Map<String, Object> map) {
        String beginDate = (String) map.get("beginDate");
        String endDate = (String) map.get("endDate");
        List<OdFeatureWorkHomeResponse> areaRankList = dataDao.getHeatMap(beginDate, endDate, 10);
        areaRankList.sort(Comparator.comparing(OdFeatureWorkHomeResponse::getCount));
        map.put("areaRankList", JSON.toJSONString(areaRankList));
        return map;
    }

    private static final String DESC_CL_HEAT_MAP = "，可以看出：{}的累计活跃人数最多，高达{}万人，其次是{}，累计活跃人数有{}万人，{}排名第三，累计活跃人数{}万人。";

    @Override
    public Map<String, Object> getHeatMap(Map<String, Object> map) {
        String beginDate = (String) map.get("beginDate");
        String endDate = (String) map.get("endDate");
        //List<OdFeatureWorkHomeResponse> heatMapList = dataDao.getHeatMap("2022-06-02 00:00:00", endDate, null);
        List<OdFeatureWorkHomeResponse> heatMapList = new ArrayList<>();
        List<String> areaNames = dataDao.distinctAreaNames();
        areaNames.forEach(name -> {
            OdFeatureWorkHomeResponse response = dataDao.lastAreaResponse(name);
            if (response != null) {
                heatMapList.add(response);
            }
        });
        final String NAME = "name";
        final String VAL = "value";
        List<Map<String, Object>> objects = new ArrayList<>();
        for (OdFeatureWorkHomeResponse res : heatMapList) {
            HashMap<String, Object> tmpMap = new LinkedHashMap<>();
            tmpMap.put(NAME, res.getCounty());
            tmpMap.put(VAL, res.getCount());
            objects.add(tmpMap);
        }
        heatMapList.sort(Comparator.comparing(OdFeatureWorkHomeResponse::getCount).reversed());
        String heatMapDesc = "";
        if (heatMapList.size() >= 3) {
            heatMapDesc = MessageFormatter.arrayFormat(DESC_CL_HEAT_MAP, new String[]{
                    heatMapList.get(0).getCounty(), MathUtil.getTenThousand(heatMapList.get(0).getCount()),
                    heatMapList.get(1).getCounty(), MathUtil.getTenThousand(heatMapList.get(1).getCount()),
                    heatMapList.get(2).getCounty(), MathUtil.getTenThousand(heatMapList.get(2).getCount()),
            }).getMessage();
        }
        map.put("clHeatMapDesc", heatMapDesc);
        map.put("heatMapList", JSON.toJSONString(objects));
        long heatMapListMax = 0;
        long heatMapListMin = 0;
        if (heatMapList.size() > 0) {
            heatMapListMax = heatMapList.get(heatMapList.size() - 1).getCount();
            heatMapListMin = heatMapList.get(0).getCount();
        }
        map.put("heatMapListMax", heatMapListMax);
        map.put("heatMapListMin", heatMapListMin);
        return map;
    }

    @Override
    public Map<String, Object> getWeiboSignedUser(Map<String, Object> map) {
        // 微博签到用户统计：热门地点数据 + 社管GDP数据组合
        String beginDate = (String) map.get("beginDate");
        String endDate = (String) map.get("endDate");

        // 获取年份
        String minCreatedDate = dataDao.getMinTopHeatAreaPerDayCreatedDate();
        DateTime minDate = DateUtil.toJodaDateTime(minCreatedDate);
        List<String> yearStringList = new ArrayList<>();
        while (!minDate.plusYears(1).isAfterNow()) {
            yearStringList.add(minDate.toString("yyyy"));
            minDate = minDate.plus(1);
        }
        if (minDate.getYear() <= DateTime.now().getYear()) {
            yearStringList.add(String.valueOf(DateTime.now().getYear()));
        }
        map.put("weiboSignedYearList", JSON.toJSONString(yearStringList));

        Map<String, List<DateWithCountDto>> dtoMap = new HashMap<>();
        // 获取热门地点签到数据
        for (String year : yearStringList) {
            DateTime yyyy = DateTime.parse(year, DateTimeFormat.forPattern("yyyy"));
            List<DateWithCountDto> heatMapGroupByDateList = dataDao.getHeatMapGroupByYear
                    (yyyy.toString("yyyy-01-01 00:00:00"), yyyy.toString("yyyy-12-31 12:59:59"));
            dtoMap.put(year, heatMapGroupByDateList);
        }
        // 获取社管GDP数据
        S02ProHgjj001Entity gdpData = sgSqBiz.getGDPData();
        String gpdStr = String.valueOf(gdpData.getShjjhgjj001Y());

        // 获取签到排行
        List<OdFeatureWorkHomeResponse> areaRankList = dataDao.getHeatMap(beginDate, endDate, 10);
        areaRankList.sort(Comparator.comparing(OdFeatureWorkHomeResponse::getCount));
        map.put("wbSignedAreaRankList", JSON.toJSONString(areaRankList));

        // 转换成ftl适配参数格式
        Map<String, List<WeiboSignedUserDto>> wbSignedMap = new HashMap<>();
        dtoMap.forEach((k, heatMapGroupByDateList) -> {
            Map<String, List<DateWithCountDto>> areasMap = heatMapGroupByDateList.stream().collect(Collectors.groupingBy(DateWithCountDto::getDatasource));
            List<WeiboSignedUserDto> weiboSignedUserDtoList = new ArrayList<>();
            areasMap.forEach((key, value) -> weiboSignedUserDtoList.add(new WeiboSignedUserDto()
                    .setAreaName(key)
                    .setPopulationCount(value)
                    .setGdp(value.stream().map(
                                    o -> new DateWithCountDto().setCount(gpdStr).setDate(o.getDate()))
                            .collect(Collectors.toList()))));
            wbSignedMap.put(k, weiboSignedUserDtoList);
        });
//        map.put("weiboSignedUserDtoList", JSON.toJSONString(weiboSignedUserDtoList));
        map.put("wbSignedMap", JSON.toJSONString(wbSignedMap));

        // 获取常住人口
        /*Map<String, List<DateWithCountDto>> dtoMap2 = new HashMap<>();
        for (String year : yearStringList) {
            DateTime yyyy = DateTime.parse(year, DateTimeFormat.forPattern("yyyy"));
            List<DateWithCountDto> dateWithCountDtoList2 = dataDao.selectByPeriodByYear(beginDate, endDate);
            dtoMap2.put(year, dateWithCountDtoList2);
        }*/
        List<DateWithCountDto> dateWithCountDtoList2 = dataDao.selectByPeriodByYear(beginDate, endDate);
        Map<String, List<DateWithCountDto>> permanentPopMap = dateWithCountDtoList2.stream().collect(Collectors.groupingBy(DateWithCountDto::getDatasource));
        Map<String, List<WeiboSignedUserDto>> wbSignedMap2 = new HashMap<>();
        dtoMap.forEach((k, heatMapGroupByDateList) -> {
            Map<String, List<DateWithCountDto>> areasMap = heatMapGroupByDateList.stream().collect(Collectors.groupingBy(DateWithCountDto::getDatasource));
            List<WeiboSignedUserDto> weiboSignedUserDtoList = new ArrayList<>();
            areasMap.forEach((key, value) -> {
                List<DateWithCountDto> permanentList = permanentPopMap.getOrDefault(key, value.stream().map(
                                o -> new DateWithCountDto().setCount("0").setDate(o.getDate()))
                        .collect(Collectors.toList()));
                boolean found;
                if (value.size() != permanentList.size()) {
                    DateWithCountDto firstPerDto = permanentList.get(0);
                    for (DateWithCountDto signedDto : value) {
                        found = false;
                        for (DateWithCountDto perDto : permanentList) {
                            if (signedDto.getDate().equals(perDto.getDate())) {
                                found = true;
                                break;
                            }
                        }
                        if (!found) {
                            permanentList.add(new DateWithCountDto()
                                    .setDate(signedDto.getDate())
                                    .setDatasource(signedDto.getDatasource())
                                    .setCount(firstPerDto.getCount()));
                        }
                    }
                }
                weiboSignedUserDtoList.add(new WeiboSignedUserDto()
                        .setAreaName(key)
                        .setPopulationCount(value)
                        .setGdp(permanentList));
            });
            wbSignedMap2.put(k, weiboSignedUserDtoList);
        });
        map.put("wbSignedMap2", JSON.toJSONString(wbSignedMap2));
        /*dtoMap2.forEach((k, dateWithCountDtoList2) -> {
            Map<String, List<DateWithCountDto>> areasMap = dateWithCountDtoList2.stream().collect(Collectors.groupingBy(DateWithCountDto::getDatasource));
            List<WeiboSignedUserDto> weiboSignedUserDtoList = new ArrayList<>();
            areasMap.forEach((key, value) -> weiboSignedUserDtoList.add(new WeiboSignedUserDto()
                    .setAreaName(key)
                    .setPopulationCount(value)
                    .setGdp(dtoMap.get(k));
            wbSignedMap2.put(k, weiboSignedUserDtoList);
        });*/
/*
        map.put("weiboSignedYearList", "[\"2022\"]");
        map.put("wbSignedAreaRankList", "[{\"count\":115814,\"county\":\"三沙市\"},{\"count\":529066,\"county\":\"屯昌县\"},{\"count\":602371,\"county\":\"昌江黎族自治县\"},{\"count\":653187,\"county\":\"五指山市\"},{\"count\":1303312,\"county\":\"秀英区\"},{\"count\":1772950,\"county\":\"临高县\"},{\"count\":2552547,\"county\":\"万宁市\"},{\"count\":2718856,\"county\":\"美兰区\"},{\"count\":2775099,\"county\":\"澄迈县\"},{\"count\":7406037,\"county\":\"三亚市\"}]");
        map.put("wbSignedMap", "{\"2022\":[{\"areaName\":\"三沙市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"189622\",\"datasource\":\"三沙市\",\"date\":\"2022-05\"},{\"count\":\"685159\",\"datasource\":\"三沙市\",\"date\":\"2022-06\"},{\"count\":\"503890\",\"datasource\":\"三沙市\",\"date\":\"2022-07\"},{\"count\":\"526566\",\"datasource\":\"三沙市\",\"date\":\"2022-08\"},{\"count\":\"438500\",\"datasource\":\"三沙市\",\"date\":\"2022-09\"},{\"count\":\"706245\",\"datasource\":\"三沙市\",\"date\":\"2022-10\"}]},{\"areaName\":\"昌江黎族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1224960\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-05\"},{\"count\":\"4530130\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-06\"},{\"count\":\"3621210\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-07\"},{\"count\":\"3358398\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-08\"},{\"count\":\"2586101\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-09\"},{\"count\":\"3690427\",\"datasource\":\"昌江黎族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"临高县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"2799784\",\"datasource\":\"临高县\",\"date\":\"2022-05\"},{\"count\":\"10480079\",\"datasource\":\"临高县\",\"date\":\"2022-06\"},{\"count\":\"8768984\",\"datasource\":\"临高县\",\"date\":\"2022-07\"},{\"count\":\"9542373\",\"datasource\":\"临高县\",\"date\":\"2022-08\"},{\"count\":\"7934443\",\"datasource\":\"临高县\",\"date\":\"2022-09\"},{\"count\":\"13027014\",\"datasource\":\"临高县\",\"date\":\"2022-10\"}]},{\"areaName\":\"龙华区\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"4146696\",\"datasource\":\"龙华区\",\"date\":\"2022-05\"},{\"count\":\"14664268\",\"datasource\":\"龙华区\",\"date\":\"2022-06\"},{\"count\":\"9822004\",\"datasource\":\"龙华区\",\"date\":\"2022-07\"},{\"count\":\"8230110\",\"datasource\":\"龙华区\",\"date\":\"2022-08\"},{\"count\":\"11004192\",\"datasource\":\"龙华区\",\"date\":\"2022-09\"},{\"count\":\"12272049\",\"datasource\":\"龙华区\",\"date\":\"2022-10\"}]},{\"areaName\":\"琼中黎族苗族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1499755\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-05\"},{\"count\":\"5612462\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-06\"},{\"count\":\"4574950\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-07\"},{\"count\":\"4976236\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-08\"},{\"count\":\"4081108\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-09\"},{\"count\":\"7049639\",\"datasource\":\"琼中黎族苗族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"屯昌县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1027724\",\"datasource\":\"屯昌县\",\"date\":\"2022-05\"},{\"count\":\"3827503\",\"datasource\":\"屯昌县\",\"date\":\"2022-06\"},{\"count\":\"3075100\",\"datasource\":\"屯昌县\",\"date\":\"2022-07\"},{\"count\":\"2951935\",\"datasource\":\"屯昌县\",\"date\":\"2022-08\"},{\"count\":\"2340365\",\"datasource\":\"屯昌县\",\"date\":\"2022-09\"},{\"count\":\"3246089\",\"datasource\":\"屯昌县\",\"date\":\"2022-10\"}]},{\"areaName\":\"琼海市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"3653278\",\"datasource\":\"琼海市\",\"date\":\"2022-05\"},{\"count\":\"13167020\",\"datasource\":\"琼海市\",\"date\":\"2022-06\"},{\"count\":\"10114408\",\"datasource\":\"琼海市\",\"date\":\"2022-07\"},{\"count\":\"9940525\",\"datasource\":\"琼海市\",\"date\":\"2022-08\"},{\"count\":\"8308001\",\"datasource\":\"琼海市\",\"date\":\"2022-09\"},{\"count\":\"12606970\",\"datasource\":\"琼海市\",\"date\":\"2022-10\"}]},{\"areaName\":\"陵水黎族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"3436962\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-05\"},{\"count\":\"12558034\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-06\"},{\"count\":\"10308248\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-07\"},{\"count\":\"9960747\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-08\"},{\"count\":\"7713154\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-09\"},{\"count\":\"14128581\",\"datasource\":\"陵水黎族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"澄迈县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"4341617\",\"datasource\":\"澄迈县\",\"date\":\"2022-05\"},{\"count\":\"15859306\",\"datasource\":\"澄迈县\",\"date\":\"2022-06\"},{\"count\":\"12793132\",\"datasource\":\"澄迈县\",\"date\":\"2022-07\"},{\"count\":\"13146843\",\"datasource\":\"澄迈县\",\"date\":\"2022-08\"},{\"count\":\"10970176\",\"datasource\":\"澄迈县\",\"date\":\"2022-09\"},{\"count\":\"19344375\",\"datasource\":\"澄迈县\",\"date\":\"2022-10\"}]},{\"areaName\":\"秀英区\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"2323781\",\"datasource\":\"秀英区\",\"date\":\"2022-05\"},{\"count\":\"8105200\",\"datasource\":\"秀英区\",\"date\":\"2022-06\"},{\"count\":\"5713658\",\"datasource\":\"秀英区\",\"date\":\"2022-07\"},{\"count\":\"4523656\",\"datasource\":\"秀英区\",\"date\":\"2022-08\"},{\"count\":\"6192713\",\"datasource\":\"秀英区\",\"date\":\"2022-09\"},{\"count\":\"7077665\",\"datasource\":\"秀英区\",\"date\":\"2022-10\"}]},{\"areaName\":\"美兰区\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"4824198\",\"datasource\":\"美兰区\",\"date\":\"2022-05\"},{\"count\":\"17212382\",\"datasource\":\"美兰区\",\"date\":\"2022-06\"},{\"count\":\"11813291\",\"datasource\":\"美兰区\",\"date\":\"2022-07\"},{\"count\":\"11249637\",\"datasource\":\"美兰区\",\"date\":\"2022-08\"},{\"count\":\"12990620\",\"datasource\":\"美兰区\",\"date\":\"2022-09\"},{\"count\":\"14881824\",\"datasource\":\"美兰区\",\"date\":\"2022-10\"}]},{\"areaName\":\"海口市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"21087815\",\"datasource\":\"海口市\",\"date\":\"2022-05\"},{\"count\":\"76592697\",\"datasource\":\"海口市\",\"date\":\"2022-06\"},{\"count\":\"56547982\",\"datasource\":\"海口市\",\"date\":\"2022-07\"},{\"count\":\"66535908\",\"datasource\":\"海口市\",\"date\":\"2022-08\"},{\"count\":\"47223116\",\"datasource\":\"海口市\",\"date\":\"2022-09\"},{\"count\":\"90835825\",\"datasource\":\"海口市\",\"date\":\"2022-10\"}]},{\"areaName\":\"定安县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"2240624\",\"datasource\":\"定安县\",\"date\":\"2022-05\"},{\"count\":\"8194599\",\"datasource\":\"定安县\",\"date\":\"2022-06\"},{\"count\":\"6557149\",\"datasource\":\"定安县\",\"date\":\"2022-07\"},{\"count\":\"7083005\",\"datasource\":\"定安县\",\"date\":\"2022-08\"},{\"count\":\"6037130\",\"datasource\":\"定安县\",\"date\":\"2022-09\"},{\"count\":\"10629862\",\"datasource\":\"定安县\",\"date\":\"2022-10\"}]},{\"areaName\":\"保亭黎族苗族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1360381\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-05\"},{\"count\":\"4970706\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-06\"},{\"count\":\"4069362\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-07\"},{\"count\":\"4391338\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-08\"},{\"count\":\"3576615\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-09\"},{\"count\":\"6267342\",\"datasource\":\"保亭黎族苗族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"五指山市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1051673\",\"datasource\":\"五指山市\",\"date\":\"2022-05\"},{\"count\":\"3772240\",\"datasource\":\"五指山市\",\"date\":\"2022-06\"},{\"count\":\"2840072\",\"datasource\":\"五指山市\",\"date\":\"2022-07\"},{\"count\":\"2896366\",\"datasource\":\"五指山市\",\"date\":\"2022-08\"},{\"count\":\"2362044\",\"datasource\":\"五指山市\",\"date\":\"2022-09\"},{\"count\":\"4270999\",\"datasource\":\"五指山市\",\"date\":\"2022-10\"}]},{\"areaName\":\"文昌市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"4833062\",\"datasource\":\"文昌市\",\"date\":\"2022-05\"},{\"count\":\"17860105\",\"datasource\":\"文昌市\",\"date\":\"2022-06\"},{\"count\":\"14634472\",\"datasource\":\"文昌市\",\"date\":\"2022-07\"},{\"count\":\"15604421\",\"datasource\":\"文昌市\",\"date\":\"2022-08\"},{\"count\":\"12303060\",\"datasource\":\"文昌市\",\"date\":\"2022-09\"},{\"count\":\"20481264\",\"datasource\":\"文昌市\",\"date\":\"2022-10\"}]},{\"areaName\":\"儋州市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"7394241\",\"datasource\":\"儋州市\",\"date\":\"2022-05\"},{\"count\":\"27843207\",\"datasource\":\"儋州市\",\"date\":\"2022-06\"},{\"count\":\"22006119\",\"datasource\":\"儋州市\",\"date\":\"2022-07\"},{\"count\":\"22426006\",\"datasource\":\"儋州市\",\"date\":\"2022-08\"},{\"count\":\"18575371\",\"datasource\":\"儋州市\",\"date\":\"2022-09\"},{\"count\":\"32131901\",\"datasource\":\"儋州市\",\"date\":\"2022-10\"}]},{\"areaName\":\"东方市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"3104660\",\"datasource\":\"东方市\",\"date\":\"2022-05\"},{\"count\":\"11100653\",\"datasource\":\"东方市\",\"date\":\"2022-06\"},{\"count\":\"8691171\",\"datasource\":\"东方市\",\"date\":\"2022-07\"},{\"count\":\"7280254\",\"datasource\":\"东方市\",\"date\":\"2022-08\"},{\"count\":\"5118369\",\"datasource\":\"东方市\",\"date\":\"2022-09\"},{\"count\":\"8024594\",\"datasource\":\"东方市\",\"date\":\"2022-10\"}]},{\"areaName\":\"万宁市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"4197429\",\"datasource\":\"万宁市\",\"date\":\"2022-05\"},{\"count\":\"15935233\",\"datasource\":\"万宁市\",\"date\":\"2022-06\"},{\"count\":\"13233072\",\"datasource\":\"万宁市\",\"date\":\"2022-07\"},{\"count\":\"13243048\",\"datasource\":\"万宁市\",\"date\":\"2022-08\"},{\"count\":\"9824308\",\"datasource\":\"万宁市\",\"date\":\"2022-09\"},{\"count\":\"16592409\",\"datasource\":\"万宁市\",\"date\":\"2022-10\"}]},{\"areaName\":\"白沙黎族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"1246456\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-05\"},{\"count\":\"4677901\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-06\"},{\"count\":\"3796526\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-07\"},{\"count\":\"4193614\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-08\"},{\"count\":\"3374393\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-09\"},{\"count\":\"5648676\",\"datasource\":\"白沙黎族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"琼山区\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"2478447\",\"datasource\":\"琼山区\",\"date\":\"2022-05\"},{\"count\":\"8608940\",\"datasource\":\"琼山区\",\"date\":\"2022-06\"},{\"count\":\"5638478\",\"datasource\":\"琼山区\",\"date\":\"2022-07\"},{\"count\":\"4715084\",\"datasource\":\"琼山区\",\"date\":\"2022-08\"},{\"count\":\"6239262\",\"datasource\":\"琼山区\",\"date\":\"2022-09\"},{\"count\":\"7279301\",\"datasource\":\"琼山区\",\"date\":\"2022-10\"}]},{\"areaName\":\"乐东黎族自治县\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"3850969\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-05\"},{\"count\":\"13863766\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-06\"},{\"count\":\"11036481\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-07\"},{\"count\":\"11296856\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-08\"},{\"count\":\"9960985\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-09\"},{\"count\":\"18190692\",\"datasource\":\"乐东黎族自治县\",\"date\":\"2022-10\"}]},{\"areaName\":\"三亚市\",\"gdp\":[{\"count\":\"479.67\",\"date\":\"2022-05\"},{\"count\":\"479.67\",\"date\":\"2022-06\"},{\"count\":\"479.67\",\"date\":\"2022-07\"},{\"count\":\"479.67\",\"date\":\"2022-08\"},{\"count\":\"479.67\",\"date\":\"2022-09\"},{\"count\":\"479.67\",\"date\":\"2022-10\"}],\"populationCount\":[{\"count\":\"12819122\",\"datasource\":\"三亚市\",\"date\":\"2022-05\"},{\"count\":\"46444185\",\"datasource\":\"三亚市\",\"date\":\"2022-06\"},{\"count\":\"37426031\",\"datasource\":\"三亚市\",\"date\":\"2022-07\"},{\"count\":\"31244588\",\"datasource\":\"三亚市\",\"date\":\"2022-08\"},{\"count\":\"24155069\",\"datasource\":\"三亚市\",\"date\":\"2022-09\"},{\"count\":\"45687962\",\"datasource\":\"三亚市\",\"date\":\"2022-10\"}]}]}");
*/
        return map;
    }
}
